--- Makefile.in.orig	2008-10-31 00:40:47.000000000 +0100
+++ Makefile.in	2009-02-02 19:14:59.892008198 +0100
@@ -267,7 +267,7 @@
 all cdklib :: $(DEFAULT)
 
 $(CDKLIB) :: $(OBJECTS)
-	@echo creating $@; $(LIBTOOL_CREATE) $@ $(LIB_OBJECT)
+	@echo creating $@; $(LIBTOOL_CREATE) $@ $(LIB_OBJECT) $(LIBS)
 	@$(RANLIB) $@
 
 cdkshlib $(CDKSHLIB) :: $(CDKSHOBJS)
--- aclocal.m4.orig	2009-02-02 19:13:54.256006211 +0100
+++ aclocal.m4	2009-02-02 19:14:39.332007971 +0100
@@ -2425,7 +2425,7 @@
  		AC_MSG_ERROR(Cannot find libtool)
  	fi
 ])dnl
-	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
+	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LDFLAGS} ${LIBTOOL_OPTS} -o'
 	LIB_OBJECT='${OBJECTS:.o=.lo}'
 	LIB_SUFFIX=.la
 	LIB_CLEAN='${LIBTOOL} --mode=clean'
--- configure.orig	2009-02-02 19:30:01.000000000 +0100
+++ configure	2009-02-02 19:30:50.000000000 +0100
@@ -3869,7 +3869,7 @@
 echo "$as_me: error: Cannot find libtool" >&2;}
    { (exit 1); exit 1; }; }
 	fi
-	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
+	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LDFLAGS} ${LIBTOOL_OPTS} -o'
 	LIB_OBJECT='${OBJECTS:.o=.lo}'
 	LIB_SUFFIX=.la
 	LIB_CLEAN='${LIBTOOL} --mode=clean'
